import * as API from './api';
const baseUrl = process.env.NODE_ENV === 'development' ? '/api' : 'http://cs.nes.com.cn/IntelligentHeating/services'
const weatherUrl = 'https://free-api.heweather.com/s6'; //天气预报

export default {
  //验证手机号是否已注册
  // isExistUser: params => {
  //   return API.GET('手机号注册地址', params);
  // },
  //注册
  // register: params => {
  //   return API.POST('注册账号地址', params)
  // },
  //密码登录
  login: params => {
    return API.POST(`${baseUrl}/userservice/login`, params)
  },
  //文章列表
  getArticleList: params => {
    return API.GET(`${baseUrl}/systemset/getArticleList`, params);
  },
  //天气预报
  weatherNow: params => {
    return API.GET(`${weatherUrl}/weather/now`, params);
  },
  airNow: params =>{
    return API.GET(`${weatherUrl}/air/now`, params);
  },
  WeatherForecast: params => {
    return API.GET(`${weatherUrl}/weather/forecast`, params);
  },
  //缴费列表
  paymentList: params => {
    return API.GET(`${baseUrl}/invoices/getInvoices`, params)
  }
}
